import IndexView from "../pages/Index.vue"
import TeamView from "../pages/team/Team.vue"
import UserView from "../pages/user/User.vue"
import SearchView from "../pages/Search.vue"
import UserEditPage from "../pages/user/UserEditPage.vue";
import SearchResultPage from "../pages/SearchResultPage.vue";
import UserLoginPage from "../pages/user/UserLoginPage.vue";
import BasicLayout from "../layouts/BasicLayout.vue";
import UserEditAvatarPage from "../pages/user/UserEditAvatarPage.vue";
import TeamCreatePage from "../pages/team/TeamCreatePage.vue";
import TeamUpdatePage from "../pages/team/TeamUpdatePage.vue";
import UserInfoPage from "../pages/user/UserInfoPage.vue";
import TeamCurrentCreatePage from "../pages/team/TeamCurrentCreatePage.vue";
import TeamCurrentJoinPage from "../pages/team/TeamCurrentJoinPage.vue";
import UserRegisterPage from "../pages/user/UserRegisterPage.vue";
import UserSecurityPage from "../pages/user/UserSecurityPage.vue";
import UserEditPassword from "../pages/user/UserEditPassword.vue";
import UserShowPage from "../pages/user/UserShowPage.vue";
import TeamShowPage from "../pages/team/TeamShowPage.vue";
import Follow from "../pages/follow/follow.vue";
import UserEditTagsPage from "../pages/user/UserEditTagsPage.vue";


const routes = [
    {
        path: '/', // 首页
        component: BasicLayout,
        children: [
            {path: '/', redirect: '/index'},
            {path: '/index', component: IndexView, name: 'index', meta: {title: '交友吧'}},
            {path: '/team', component: TeamView, name: 'team', meta: {title: '找队伍'}},
            {path: '/team/showInfo', component: TeamShowPage, name: 'teamShow', meta: {title: '队伍信息'}},
            {path: '/user', component: UserView, name: 'user', meta: {title: '个人信息'}},
            {path: '/user/info', component: UserInfoPage, name: 'userInfo', meta: {title: '详细信息'}},
            {path: '/user/showInfo', component: UserShowPage, name: 'userShow', meta: {title: '用户信息'}},
            {path: '/user/security', component: UserSecurityPage, name: 'userSecurity', meta: {title: '账号与安全'}},
            {
                path: '/user/team/create',
                component: TeamCurrentCreatePage,
                name: 'teamCurrentCreate',
                meta: {title: '我创建的队伍'}
            },
            {
                path: '/user/team/join',
                component: TeamCurrentJoinPage,
                name: 'teamCurrentJoin',
                meta: {title: '我加入的队伍'}
            },
            {path: '/search', component: SearchView, name: 'search', meta: {title: '标签搜索'}},
            {path: '/user/edit', component: UserEditPage, name: 'userEdit', meta: {title: '修改信息'}},
            {path: '/user/editTags', component: UserEditTagsPage, name: 'userEditTags', meta: {title: '修改标签'}},
            {path: '/user/editPassword', component: UserEditPassword, name: 'userEditPassword', meta: {title: '修改密码'}},
            {
                path: '/user/editAvatar',
                component: UserEditAvatarPage,
                name: 'userEditAvatar',
                meta: {title: '修改头像'}
            },
            {path: '/user/list', component: SearchResultPage, name: 'searchResult', meta: {title: '搜索结果'}},
            {path: '/team/create', component: TeamCreatePage, name: 'teamCreate', meta: {title: '创建队伍'}},
            {path: '/team/update', component: TeamUpdatePage, name: 'teamUpdate', meta: {title: '更新队伍'}},
            {path: '/follow', component: Follow, name: 'follow', meta: {title: '关注'}},

        ]
    },
    {
        path: '/user/login', // 登录
        component: UserLoginPage,
        name: 'userLogin',
        meta: {title: '登录'}
    },
    {
        path: '/user/register',
        component: UserRegisterPage,
        name: 'userRegister',
        meta: {title: '注册'}
    }

]

export default routes